<?php

Yii::import('zii.widgets.CPortlet');

class WidgetPlatform extends CPortlet {

    public  $platform_id;
    protected $dataGame;
    public function init() {    
         $this->dataGame = new CActiveDataProvider('GamePlatform', array(
                            'criteria' => array(
                                'condition' => 'platform_id= '.$this->platform_id, //.Yii::app()->user->getUser()->id,                        				                                                            
                                'order'=>'`order` ASC'
                            ),
                            'pagination'=>array(
                                    'pageSize'=>'1000'
                            ),
                        )); 
        parent::init();
    }

    protected function renderContent() {         
        $this->render('gamePlatform', array(
            'dataGame' => $this->dataGame,
            'platform_id'=> $this->platform_id
        ));       
    }

}